#ifndef MOUSE_H
#define MOUSE_H
#include "main.h"
extern void delay_5us(void);
extern void delay_10us(void);
extern void delay_20us(void);
extern void delay_40us(void);
extern void delay_80us(void);
#define CLK GPIO_PIN_1
#define DATA GPIO_PIN_2
enum Step
{
	STREAM = 0,
	RECV,
	RESET_MOUSE,
	IDLE,
	SERIAL
};
extern uint8_t u1Buff[1024];
extern uint16_t u1Len ;
void MouseInit();
int MouseSendByte(uint8_t c);
int MouseReadByte();
void MouseCycle();
void MouseReport(uint8_t left,uint8_t right,uint8_t middle,int x,int y);
enum Step MouseGetStep();
#endif